<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<?php if($sf_user->isAuthenticated()):?>
	<?php echo $form->renderGlobalErrors() //TODO: Сделать проверку на хтмл теги  ?>
	<form action="<?php echo url_for('sfForumMessage/create') ?>" method="POST" onsubmit="if(!$('#sf_forum_message_content').html()){alert('Введите текст сообщения!').html());return false;}">
	  <table class='tableaddmessage'>
	  	<tr>
	  	<td>
	    <?php echo $form['author']->render(array('value'=>$sf_user->getGuardUser()->getId())) ?>
	    <?php echo $form['content']->renderRow() ?>
	    <?php echo $form['topic_id']->render(array('value'=>$topic_id)) ?>
	    </td>
	    </tr>	    
	    <tr>
	      <td>
	        <input class="forumbutton" type="submit" value="Отправить"/>
	      </td>
	    </tr>
	  </table>
	</form>
<?php endif;?>